A cache locally stores data from a main memory (e.g., a volatile memory device, a non-volatile memory device, etc.). Caches are often implemented using volatile memory that store data when powered and lose memory state when power is removed. Accordingly, data in a cache may be lost or deemed unreliable in the event of a system shut down or power failure.
A central processing unit (and/or memory controller) uses a cache to increase the speed of data operations because accessing data in cache may be faster than performing read and/or write operations in the main memory. For example, a CPU retrieves data from main memory and stores the retrieved data in a cache line (e.g., 64 bytes of data) of the cache when the data is to be used, edited, manipulated, etc. via read and/or write operations. If the data is modified in the cache, then it is to be written back to main memory. After modifying the data in the cache line, but before the modified data is written back from the cache to the main memory, the cache line storing is, therefore, inconsistent with the data of the main memory. Such cache lines are to be written back (e.g., flushed) to a non-volatile memory in order to maintain persistence of the cache data.
Wherever possible, the same reference numbers will be used throughout the drawing(s) and accompanying written description to refer to the same or like parts.